package com

class Pessoa {
	
	String cpf
	String nome 
	String rua
	String bairro
	String numero
	String complemento
	String cep
	String telefone
	
    static constraints = {
		cpf(blank:false, unique:true, size:11..11, attributes:[length:"11", mask:"cpf"])
		nome(blank:false)
		rua(blank:false)
		bairro(blank:false)
		numero(blank:false)
		complemento(blank:true)
		cep(blank:false, size:1..8)
		telefone(blank:false, size:10..10, attributes:[length:"10", mask:"telefone"])
    }
	
	public String toString() {
		return nome
	}
}
